<?php
/* @var $this ImgsController */
/* @var $model Imgs */
/* @var $form CActiveForm */
?>
<style>
    input[type="text"] {
        padding: 4px 0;
        width: 500px;
    }
    textarea{
        padding: 4px 0;
        width: 500px;
    }
    div.buttons{
        background-image: url("/easyui/images/linkbutton_bg.png");
        background-position: right 0;
        background-repeat: no-repeat;
        border-radius: 5px 5px 5px 5px;
        color: #444444;
        cursor: pointer;
        display: inline-block;
        float: right;
        font-size: 12px;
        height: 24px;
        outline: medium none;
        padding-right: 18px;
        text-decoration: none;
        float: left;
    }
    input[type="submit"]{
        background: url("/easyui/images/button_span_bg.gif") no-repeat scroll left top transparent;
        display: inline-block;
        height: 24px;
        line-height: 24px;
        padding: 4px 0 4px 18px;
        border: 0;
    }
</style>

<div class="form" style="width: 98%;margin: 0 auto;border: 1px solid #99BBE8;padding: 20px;">

<?php $form=$this->beginWidget('bootstrap.widgets.TbActiveForm', array(
	'id'=>'shop-form',
	'enableAjaxValidation'=>false,
    'htmlOptions'=>array('enctype'=>'multipart/form-data'),
)); ?>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'title'); ?>
		<?php echo $form->textField($model,'title',array('size'=>60,'maxlength'=>255)); ?>
		<?php echo $form->error($model,'title'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'content'); ?>
		<?php echo $form->textArea($model,'content',array('rows'=>6, 'cols'=>50)); ?>
		<?php echo $form->error($model,'content'); ?>
	</div>

    <div class="row">
        <?php echo $form->labelEx($model,'latitude'); ?>
        <?php echo $form->textField($model,'latitude',array('size'=>60)); ?>
        <?php echo $form->error($model,'latitude'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model,'longitude'); ?>
        <?php echo $form->textField($model,'longitude',array('size'=>60)); ?>
        <?php echo $form->error($model,'longitude'); ?>
    </div>

    <div class="row">
        <?php
        $type_r=array(
            0=>'店铺',
            1=>'工厂',
            2=>'仓库',
        );

        echo $form->dropDownListRow($model, 'type', $type_r);  ?>
    </div>

	<div class="row">
		<?php echo $form->labelEx($model,'url'); ?>
		<?php echo $form->textField($model,'url',array('size'=>60,'maxlength'=>255)); ?>
		<?php echo $form->error($model,'url'); ?>
	</div>


	<!-- 
    <div class="row">
        <label for="imei" class="required">imei <span class="required">*</span></label>
        <input name="imei" id="imei" type="text" />
    </div>
	
    <div class="row">
        <label for="UserLogin_username" class="required">username <span class="required">*</span></label>
        <input name="UserLogin[username]" id="UserLogin_username" type="text" />
    </div>

    <div class="row">
        <label for="UserLogin_password" class="required">password <span class="required">*</span></label>
        <input name="UserLogin[password]" id="UserLogin_password" type="password" />
    </div>
 -->
    <input name="UserLogin[rememberMe]" id="UserLogin_rememberMe" value="1" type="hidden" /><br />

    <div class="row">
        <?php echo $form->labelEx($model,'img'); ?>
        <?php echo $form->fileField($model,'img',array('size'=>60)); ?>
        <?php echo $form->error($model,'img'); ?>
        <?php
        if(!empty($model->img)){
            echo '<img src="'.$model->img.'" style="max-width:640px;" />';
        }
        ?>
    </div>

    <div class="row buttons" style="margin-top: 20px;">
		<?php echo CHtml::submitButton($model->isNewRecord ? '新增' : '保存'); ?>
	</div>

    <br />

<?php $this->endWidget(); ?>

</div><!-- form -->